function [PQ, status, scheduledTargets] = BsMf_Schedule_Heuristic_Ambiguous(PQ, sensor1TargetOrder, sensor2TargetOrder, param)
%BsMf_Schedule_Heuristic_Ambiguous Summary of this function goes here
%   Detailed explanation goes here

s1Permutations = ST_TargetListPermutations(sensor1TargetOrder);
s2Permutations = ST_TargetListPermutations(sensor2TargetOrder);
totalPermutations = s1Permutations * s2Permutations;

allTargetStrings = [];
for p = 1:totalPermutations
  % generate a combination that adheres to ambiguities
  [s1NrTargets, s1OlTargets] = ST_OrderedTargetList2(sensor1TargetOrder, floor(p / s2Permutations));
  [s2NrTargets, s2OlTargets] = ST_OrderedTargetList2(sensor2TargetOrder, mod(p, s2Permutations));

  % build list of strings
  [pAllTargetStrings] = HR_FindAllTargetStringsRecursive(s1NrTargets, s1OlTargets, s2NrTargets, s2OlTargets);
  allTargetStrings = [allTargetStrings pAllTargetStrings];
end

% prune equal strings
[uniqueTargetStrings] = HR_PruneTargetEqualStrings(allTargetStrings);

% prune sub-strings
%[targetStrings] = HR_PruneTargetSubStrings(uniqueTargetStrings);
targetStrings = uniqueTargetStrings;

% use priority queue to select best string.
[scheduledTargets, status] = HR_SelectBestTargetString(PQ, targetStrings);
end